package com.yuhs.zixing.study.design.pattern.dp002.create.c001.singleton;

/**
 * @description 饿汉式  静态代码块
 * @author: yuhs
 * @date 2022/3/30 下午2:37
 */
public class SingletonDemo002 {

    private static final SingletonDemo002 INSTANCE;
    private SingletonDemo002() {
    }
    static {
        INSTANCE = new SingletonDemo002();
    }

    public static SingletonDemo002 getInstance() {
        return INSTANCE;
    }
}
